﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ServeNHL.Models
{
    public class SearchViewModel
    {
        //Queries that Josh needs for the search controller


        public List<USER> searchUser(string searchCritera)
        {
            List<USER> results = new List<USER>();

            using (var dbconn = new fclick_dbEntities())
            {
                //queries return list of users names first and last and username

            }

            return results;
        }// end of public List<USER> searchUser(string searchCritera)



         /// <summary>
         /// Gets events users are signed up for 
         /// </summary>
         /// <param name=""></param>
         /// <returns></returns>
        public List<EVENT> getUsersEvents (string searchCriteria )
        {

            List<EVENT> results = new List<EVENT>(); 
            //query
        //join user

            return results;
        }
        // end of public List<USER> searchUser (string searchCritera)


        /// <summary>
        /// get events that based on start date and end date
        /// </summary>
        /// <param name="EventName"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public List<EVENT> getEvents (string EventName = "", DateTime? start = null, DateTime? end = null)
        {

        List<EVENT> results = new List<EVENT>();

            //no name is provided
            if (String.IsNullOrEmpty(EventName))
            {
                //query for getting events between dates

            }

            //A name is provided but no start or end date
            else if ((!String.IsNullOrEmpty(EventName)) && start == null && end == null)
            {
                //query based on Eventname

            }

            //all parameters provided
            else if (((!String.IsNullOrEmpty(EventName))) && start != null && end != null)
            {
                //query for name of event that is in date range
            }

            return results;
        // end of public List<EVENT> getEvents (string EventName = "", DateTime? start = null, DateTime? end = null)


    }



    }// end of search viewmodel
     
}